import Vue from 'vue'
import VueRouter from 'vue-router'
// import store from './store'
import Cookie from "js-cookie"

Vue.use(VueRouter)

 const routes = [
  // {path:'/', redirect: '/login'}, 
 
  {
    path: '/',
    name: 'layout',
    component: () => import( '@/views/layout'),
    redirect: '/home',
   
    // children:[

    //   {
    //     path: '',
    //     name: 'home',
    //     component: () => import(/* webpackChunkName: "about" */ '../views/childen/home.vue'),
    //   }

    // ],   
    
  },
  {
    path: '/login',
    name: 'login',
    component: () => import(/* webpackChunkName: "about" */ '../views/page/login'),
  },
 
] 

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

// router.addRoute(routerObj)
export default router
